import { createApp } from 'vue'
import App from './App.vue'
// 引入less
import "@/assets/less/index.less"
// 引入router
import router from "./router/index.js"
// 引入element plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入element 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
// 引入element 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 引入piain
import { createPinia } from 'pinia'
const pinia = createPinia();
// 引入mock模拟数据
import './api/mock.js'
// 引入api
import api from "./api/api.js"
// 挂载到页面上面

app.config.globalProperties.$api = api
app.use(pinia)
app.use(ElementPlus)
app.use(router).mount('#app')
